package com.bristua.mall.user.controller;

import com.bristua.mall.common.bean.Result;
import com.bristua.mall.common.utils.HandleResultUtil;
import com.bristua.mall.user.biz.UpdateUserInviteCodeBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/3/25.
 */
@RestController
@Api(value="修改邀请码",tags={"修改邀请码"})
public class UpdateUserInviteCodeController {

    @Autowired
    private UpdateUserInviteCodeBiz updateUserInviteCodeBiz;
    @ApiOperation(value="修改邀请码")
    @PostMapping(value="/api/user/update/invitecode/{inviteCode}")
    public Result updateUserInviteCode(@PathVariable(value="inviteCode") String inviteCode){
        updateUserInviteCodeBiz.updateUserInviteCodeBiz(inviteCode);
        return HandleResultUtil.updateSuccessResult();
    }
}
